Skip to content

docs(openapi): remove phantom /sports/{sportId} and /sportsbooks/{bookId} (#205)#218

Merged
Mlaz-code merged 1 commit into
mainfrom
fix/205-openapi-drift
May 7, 2026
Merged

docs(openapi): remove phantom /sports/{sportId} and /sportsbooks/{bookId} (#205)#218
Mlaz-code merged 1 commit into
mainfrom
fix/205-openapi-drift

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Summary

Closes #205. Both routes were declared in public/openapi.json but never implemented in sharp-api-go — every customer call hits the bare Go ServeMux 404. The list endpoints /sports and /sportsbooks already cover the use case, so per the issue's own recommendation we strip the singular path-param variants.

Re-test of the other 5 routes the issue called out

Since the issue was filed (2026-05-04), the /account/* namespace and /stream were implemented in sharp-api-go. Confirmed against live api.sharpapi.io:

Route Result
GET /api/v1/account 200
GET /api/v1/account/keys 400 (validates input — route exists)
POST /api/v1/account/keys 400 (validates input — route exists)
GET /api/v1/account/usage 200
DELETE /api/v1/account/keys/{id} 400 (validates input — route exists)
POST /api/v1/account/keys/{id}/rotate 400 (validates input — route exists)
GET /api/v1/stream 200 (SSE streams)
GET /api/v1/sports/{sportId} 404 ← still phantom, removed
GET /api/v1/sportsbooks/{bookId} 404 ← still phantom, removed

So this PR closes #205 by aligning the spec with the live backend.

Verification

  • npm run build clean (53 pages indexed, 0 errors)
  • python3 -m json.tool public/openapi.json parses
  • No orphan references to getSport/getSportsbook operationIds in spec or content/
  • Targeted byte-range removal so the diff captures only the two deleted paths (the x-generated-at / x-commit-sha and enum formatting deltas are the build pipeline's normal JSON.stringify(spec, null, 2) output via scripts/stamp-openapi.mjs)

Test plan

  • Spec validates as OpenAPI 3.1.0
  • Static export still builds
  • Vercel preview deploys
  • Spot-check Mintlify / docs frontend renders without those routes

🤖 Generated with Claude Code

…kId}

Closes #205. Both routes were declared in `public/openapi.json` but never
implemented in `sharp-api-go` — every customer call hits the bare Go
ServeMux 404 ("404 page not found"). The list endpoints `/sports` and
`/sportsbooks` already cover the use case, so per the issue's
recommendation we strip the singular path-param variants from the spec.

Re-tested the other 5 routes the issue called out and they all resolve
on the live origin now (`/account` 200, `/account/keys` 400 for missing
input, `/account/keys/{id}` 400, `/account/keys/{id}/rotate` 400,
`/account/usage` 200, `/stream` 200 SSE) — those landed in
`sharp-api-go` since the issue was filed.

Verified:
- `npm run build` clean (53 pages, 0 errors)
- `python3 -m json.tool public/openapi.json` parses
- `grep getSport\b|getSportsbook\b` returns no orphan references in
  content/ or the spec

Removal is byte-targeted (no formatter reflow) so the diff is pure
deletions: 124 lines removed from the spec.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Mlaz-code Mlaz-code merged commit 9923878 into main May 7, 2026
@Mlaz-code Mlaz-code deleted the fix/205-openapi-drift branch May 7, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAPI spec drift: 7 phantom routes return 404 on live API

1 participant